#include <iostream>
#include <string.h>
#include "ShareMemory.hpp"
#include "test.hpp"
#include "Time.hpp"

int main()
{
    shm.CreateShm();
    shm.AttachShm();


    struct data* image = (struct data*)shm.GetAddr();

    while(true)
    {
        printf("status: %s\n",image->status);
        printf("lasttime: %s\n",image->lasttime);
        printf("image: %s\n",image->image);
        
        strcpy(image->status,"过期");
        sleep(5);
    }


    shm.DetachShm();
    shm.DeleteShm();

    return 0;
}
